/**
 * @(#)Pet.java   2012-10-22
 * 
 * CopyRight (c) 2012-2020 TCL Digital Technology (shenzhen) CO.,Ltd. All rights reserved.
 * 
 * @description: 
 * 
 * @version: 1.0
 * 
 * @modification history:
 *     2012-10-22 Modified By zhaodm : Create
 * 
 * 
 */
package com.zhaodm.practise.service;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @description: 
 * 
 */
public class Pet implements Parcelable {
	
	private String name;
	private float weight;
	
	public Pet() {
		
	}
	public Pet(String name, float weight) {
		this.name = name;
		this.weight = weight;
	}

	/* (non-Javadoc)
	 * @see android.os.Parcelable#describeContents()
	 */
	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	/* (non-Javadoc)
	 * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int)
	 */
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeString(name);
		dest.writeFloat(weight);
	}
	
	public static final Parcelable.Creator<Pet> CREATOR = new Parcelable.Creator<Pet>() {

		@Override
		public Pet createFromParcel(Parcel source) {
			// TODO Auto-generated method stub
			return new Pet(source.readString(), source.readFloat());
		}

		@Override
		public Pet[] newArray(int size) {
			// TODO Auto-generated method stub
			return new Pet[size];
		}
	};

}
